import request from '@/api/request.js'
//获取公钥加密 Key
export function getAuthCodeKey() {
  return request({
    url: `system/login/code`,
    method: 'get',
  })
}

//获取图形验证码 
export function getCaptcha() {
  return request({
    url: `system/login/captcha`,
    method: 'get',
    responseType: 'arraybuffer'
  })
}


// 登录
export function login (params) {
  return request({
    url: `system/login/login`,
    method: 'post',
    data: params
  })
}

// 登出
export function loginOut () {
  return request({
    url: `system/login/logout`,
    method: 'get'
  })
}
